<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script>
</head>

<body>
    <div id="app">
        <!-- 单选使用字符串 -->
        <h2>选择学科</h2>
        <select v-model="SubJect" name="" id="">
            <option value="语文">语文</option>
            <option value="数学">数学</option>
            <option value="英语">英语</option>
            <option value="生物">生物</option>
        </select>

        <!-- 多选同类型使用数组  -->
        <!-- multiple 下拉框多选 按ctrl选中  -->
        <h2>选择爱好</h2>
        <select v-model="Hobby" name="" id="" multiple>
            <option value="足球">足球</option>
            <option value="篮球">篮球</option>
            <option value="乒乓球">乒乓球</option>
            <option value="排球">排球</option>
            <option value="羽毛球">羽毛球</option>
            <option value="台球">台球</option>
        </select>
    </div>
    <script>
        Vue.config.productionTip = false;
        
        const vm = new Vue({
            el: "#app",
            data() {
                return {
                    // 默认第一个为语文
                    SubJect:"语文",
                    Hobby:[]
                }
            }
        })
</script>
</body>

</html>